﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Entity
{
    public class PlayerStatsBIResponse
    {
        public int Code { get; set; }
        public string Message { get; set; }
        public int ELO { get; set; }
        public int Level { get; set; }
        public int Win { get; set; }
        public int Draw { get; set; }
        public int Loss { get; set; }

        public PlayerStatsServiceResponse ToDto()
        {
            PlayerStatsServiceResponse response = new PlayerStatsServiceResponse();
            response.Code = Code;
            response.Message = Message;
            response.ELO = ELO;
            response.Level = Level;
            response.Win = Win;
            response.Loss = Loss;
            response.Draw = Draw;
            return response;
        }

        public PlayerStatsBIResponse()
        {

        }

        public PlayerStatsBIResponse(int ErrorCode)
        {
            Code = ErrorCode;
            Message = new ErrorCodes().GetErrorCodes(ErrorCode);
        }

        public List<string> Log()
        {
            List<string> result = new List<string>();
            result.Add("Method: Getting player statistics - Response");
            result.Add("Response code: " + Code);
            result.Add("Response message: " + Message);
            return result;
        }
    }
}
